package com.sgb.kjwl.view.ui.adapter.material;

import android.content.Context;
import android.widget.TextView;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.user.SingleEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class GoodsSTAdapter extends BaseRecycleAdapter<SingleEntity> {
    private TextView value;
    private TextView key;
    public GoodsSTAdapter(Context context, List<SingleEntity> data) {
        super(context, R.layout.item_params_st, data);
    }

    @Override
    public void convert(ItemViewHolder holder, SingleEntity entity) {
        holder.setBinding(BR.viewModel, entity);
        value = holder.itemView.findViewById(R.id.value);
        key = holder.itemView.findViewById(R.id.key);
        key.setText(entity.getKey());
        value.setText(entity.getValue());
    }
}
